Optimal. Leaf size=35 \[ -\frac{a^2 \tanh ^{-1}(\cos (e+f x))}{f}+2 a b x-\frac{b^2 \cos (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0589407, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {2746, 2735, 3770} \[ -\frac{a^2 \tanh ^{-1}(\cos (e+f x))}{f}+2 a b x-\frac{b^2 \cos (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2746
Rule 2735
Rule 3770
Rubi steps
\begin{align*} \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx &=-\frac{b^2 \cos (e+f x)}{f}+\int \csc (e+f x) \left (a^2+2 a b \sin (e+f x)\right ) \, dx\\ &=2 a b x-\frac{b^2 \cos (e+f x)}{f}+a^2 \int \csc (e+f x) \, dx\\ &=2 a b x-\frac{a^2 \tanh ^{-1}(\cos (e+f x))}{f}-\frac{b^2 \cos (e+f x)}{f}\\ \end{align*}
Mathematica [B] time = 0.0222213, size = 76, normalized size = 2.17 \[ \frac{a^2 \log \left (\sin \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f}-\frac{a^2 \log \left (\cos \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f}+2 a b x+\frac{b^2 \sin (e) \sin (f x)}{f}-\frac{b^2 \cos (e) \cos (f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.044, size = 52, normalized size = 1.5 \begin{align*} 2\,abx-{\frac{{b}^{2}\cos \left ( fx+e \right ) }{f}}+{\frac{{a}^{2}\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{f}}+2\,{\frac{abe}{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.64878, size = 59, normalized size = 1.69 \begin{align*} \frac{2 \,{\left (f x + e\right )} a b - b^{2} \cos \left (f x + e\right ) - a^{2} \log \left (\cot \left (f x + e\right ) + \csc \left (f x + e\right )\right )}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.07163, size = 147, normalized size = 4.2 \begin{align*} \frac{4 \, a b f x - 2 \, b^{2} \cos \left (f x + e\right ) - a^{2} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + a^{2} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right )}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (e + f x \right )}\right )^{2} \csc{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.80073, size = 70, normalized size = 2. \begin{align*} \frac{2 \,{\left (f x + e\right )} a b + a^{2} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) - \frac{2 \, b^{2}}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 1}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]